<div id="content">
	<div class="row s_page_title  y_map_title" *ngIf="railTitle ==='新建'">
		<sa-big-breadcrumbs [items]="['环卫运维管理','新建围栏']" icon="fa fa-recycle" class="col-xs-12 col-sm-7 col-md-7 col-lg-4"></sa-big-breadcrumbs>
	</div>
	<div class="row s_page_title  y_map_title" *ngIf="railTitle ==='编辑'">
		<sa-big-breadcrumbs [items]="['环卫运维管理','编辑围栏']" icon="fa fa-recycle" class="col-xs-12 col-sm-7 col-md-7 col-lg-4"></sa-big-breadcrumbs>
	</div>
	<div style="position: relative;min-height: 600px;border-radius: 0 4px 4px 0;" id='wrap'> 
	
		<div class="well well-sm col-xs-12 col-sm-12 col-md-12" style="margin: 0;padding:12px 0;">
		<!--轨迹颜色的控制条end-->
		<div class="widget-box">
			<div class="widget-body">
				<div class="widget-main">
					<input type="hidden" id="companyId" name="companyId" value="">
					<div class="row">
						<div class="col-xs-12" style="position: relative;">
							
							<div class="seachDiv col-xs-md col-lg-3 " >
								<div id="r-result"  class="input-group">
									<input type="text" id="suggestId" style="min-width: 148px;" placeholder='请输入需要搜索的地址' class="col-xs-10 form-control" />
									<span class="input-group-btn">
										<button type="button" class="btn btn-primary btn-sm" id="search">
											<i class="ace-icon fa fa-search icon-on-right bigger-110"></i>搜索
										</button>
									</span>
								</div>
								<div id="searchResultPanel" style="border:1px solid #C0C0C0;width:150px;height:auto; display:none;"></div>
							</div>
							
							<!--围栏标注部分-->
							<div  style="position: absolute;right: 8px;top: 8px;z-index:9" class="enclosure"> 
								<ul>
									<li	 (click)="listenerRail(1)"  class="rail1" >
										<img src="assets/img/deployIcon/icon2.png">
										<span class="railType railHover1">标注点</span>
									</li>
									<li  (click)="listenerRail(2)"  class="rail2">
										<img src="assets/img/deployIcon/icon1.png">
										<span class="railType railHover2">多边形</span>
									</li>
								    <li  class="rail2" (click)="goBackTo()">
                                        <img src="assets/img/deployIcon/back.png">
                                        <span class="railType railHover2">返回围栏列表</span>
                                    </li>
								</ul>
								
							</div>
							
							<!--围栏信息部分-->
							<div  class="deployRail row" [hidden]='!isRailView'>
								<div class="deployTitle">{{railTitle}}标注点</div>
								<div style="padding-top:12px;">
									<form id="myForm">
										<div class="row" style="margin-bottom: 2px;">
											<div class="form-group">
												<label class="control-label col-sm-2 deployLabel" >*名称</label>
												<div class="col-sm-10">
													<div class="clearfix">
														<input class="form-control styleInp" name="name" [(ngModel)]='railName' type="text" placeholder="输入围栏名称">
													</div>
												</div>
											</div>
										</div>	
										<div class="row" >
											<div class="form-group">
												<label class="control-label col-sm-2 deployLabel" >*公司</label>
												<div class="company_tree col-sm-10" style="display: inline-block;vertical-align: middle;">
 													<div class="clearfix" style="position: relative;">
 														<div class="s_hover_box s_fix_radius" style="width: 100%;border-radius: 0;">
															<input class="form-control tree_company_input"  id="company" name="selectedCompanyName" (input)="companySearch()" autocomplete="off" [(ngModel)]='selectedCompanyName' (click)="companyClick()" type="text" placeholder="请选择或输入关键字" />
															<div class="s_del_icon" (click)='delText()'>x</div>
 														</div>
														<div class="s_tree_box" id="tree_box">
															<div class="vision_tree" id="vision_tree">
																<div id="tree"></div>
															</div>
														</div>
													</div>
												</div>
											</div>
										</div>
										<div class="row" >
											<div class="form-group">
												<label class="control-label col-sm-2 deployLabel" >*类型</label>
												<div class="col-sm-10">
													<div class="clearfix">
														<select class="deployType form-control" name="typeId"  [(ngModel)]='deployType'>
															<option *ngFor='let item of deployTypeList' [value]="item.value">{{item.name}}</option>
														</select>
													</div>
												</div>
											</div>
										</div>
										
										
										<div class="row"  *ngIf='isRangeView' style="margin-bottom:5px;">
											<div class="form-group">
												<label class="control-label col-sm-2 deployLabel" >范围</label>
												<div class="col-sm-10">
													<div class="clearfix">
														<div class="range_tree" style="display: inline-block;vertical-align: middle;">
															<div class="clearfix" style="position: relative;">
																<div class="s_hover_box s_fix_radius">
																	<input class="form-control tree_range_input" (change)='rangeChange(railRange)' id="range" name="selectedRange" (input)="rangeSearch()" autocomplete="off" [(ngModel)]='railRange' (click)="rangeClick()" type="number" placeholder="请选择或输入关键字" />
																	<div class="s_del_icon" (click)='delRange()'>x</div>
																</div>
																<div class="s_tree_box" id="tree_selectedRange" style="min-width: 194px;height: 320px;">
																	<div class="vision_tree" id="vision_rangetree">
																		<div id="rangeTree" class="rangeTree"></div>
																	</div>
																</div>
															</div>
												      	</div>
													</div>
												</div>
											</div>
										</div>	
										<div class="row" style="margin-bottom: 2px;">
											<div class="form-group">
												<label class="control-label col-sm-5 deployLabel" >*围栏停留时长(分)</label>
												<div class="col-sm-7">
													<div class="clearfix">
														<input class="form-control styleInp" name="stayTime" [(ngModel)]='stayTime' type="tel" placeholder="输入围栏停留时长(分)">
													</div>
												</div>
											</div>
										</div>	
										<div class="row" style="padding-top:10px;">
											<div class="form-group">
												<label class="control-label col-sm-2 no-padding-right" style="text-align: right;padding: 0;line-height: 28px;">颜色</label>
												<div class="col-sm-9">
													<div class="clearfix">
														<ul class="slectColor">
															<li style="background:#A90329" class="myColor">✓ </li>
															<li style="background:#C79121"> </li>
															<li style="background:#57889C"> </li>
															<li style="background:#AC5287"> </li>
															<li style="background:#356E35"> </li>
														</ul>
													</div>
												</div>
											</div>
										</div>
									</form>
									<div class="row ">
							
										<div class="smaller col-xs-12" style="padding:0;margin: 12px 0;">
											<button class="btn btn-white" id="saveDeployBtn" (click)="saveDeploy(false)">
													保存
												</button>
											<button class="btn btn-white btn-white" (click)="saveDeploy(true)">
													保存{{railTitle}}
												</button>
											<button class="btn btn-white btn-white" *ngIf="railTitle == '新建'" (click)="cencelDeploy()">
													取消
												</button>
											<button class="btn btn-white btn-white" *ngIf="railTitle == '编辑'" (click)="goBackTo()">
													返回围栏
												</button>
										</div>
									</div>
								</div>
							</div>
							<div id="baiduMap"  class="fix-maplabel"></div>
							<sa-bmap-tools [baiduMap]="mp" [isShowZoom]="true"  [reduceWidth]="474" baiduMapHeight="140px"></sa-bmap-tools>
						</div>
					</div>
				</div>
			</div>
		</div>
	</div>
	</div>
</div>